package com.search_wheel.pojo.dto;

// AI智能解释结果封装
public class AiExplanation {
    private String keyword;
    private String explanation;
    private boolean success;
    private String errorMessage;

    // 静态工厂方法
    public static AiExplanation success(String keyword, String explanation) {
        AiExplanation result = new AiExplanation();
        result.keyword = keyword;
        result.explanation = explanation;
        result.success = true;
        return result;
    }

    public static AiExplanation error(String keyword, String errorMessage) {
        AiExplanation result = new AiExplanation();
        result.keyword = keyword;
        result.errorMessage = errorMessage;
        result.success = false;
        return result;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getExplanation() {
        return explanation;
    }

    public void setExplanation(String explanation) {
        this.explanation = explanation;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
